<?php
class indexController extends Controller{
    public function __construct(){
		parent::__construct();
		
	}
	public function s(){
		return array('index');
	}

	public function index(){
        $object=load_service('a_index',P_SVC);
		include($this->viewer_dir.'index.php');
	}
    //跳转
    public function jump(){
        $go=$_GET['go'];
        $url = '/mobile.php';
        $url2 = '/index.php';
        if(isset($go)) {
            if($go == 'touch') {
                set_cookie('mobile', $go, 0);
                exit(header('location:'.$url));
            } else if($go == 'pc') {
                set_cookie('mobile', $go, 0);
                exit(header('location:'.$url2));
            }
        }
        if(get_cookie('mobile') != 'pc') {
            if(preg_match("/(iPhone|iPod|Android)/i", $_SERVER['HTTP_USER_AGENT'])) exit(header('location:'.$url));
            if(preg_match("/(Phone|Mobile)/i", $_SERVER['HTTP_USER_AGENT'])) exit(header('location:'.$url));
        }
    }
//
}